home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.02 Feb 91 / xserial source ƒ / xinit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-26  |  798 b   |  43 lines  |  [TEXT/KAHL]

  1. /* xinit
  2.  *    initializes xcmd parameter block
  3.  */
  4. #include "xcmd.h"
  5.  
  6. #ifdef XTEST
  7.  
  8. xinit(pb)
  9.     XCmdBlock    *pb;
  10. {
  11.     short        i;
  12.     
  13.     /* for testing purposes, we simply set up 16 handles of 255 bytes
  14.      * each and leave them around. while a bit sloppy, it does not
  15.      * make any difference in the test environment.
  16.      */
  17.     pb->paramCount = 0;
  18.     for(i = 0;i <= 15;i++)
  19.         pb->params[i] = NewHandle(255);
  20.     
  21.     /* the following are only available in the FoxBase
  22.      * version of the XCMD.
  23.      */
  24. #ifdef FOX
  25.     pb->version = 1;
  26.     pb->options = 0;
  27.     pb->PrintRec = 0L;
  28.     pb->printPort = 0L;
  29.     pb->foxuser = -1;
  30.     pb->setresource = -1;
  31.     pb->utillong1 = 0L;
  32.     pb->utillong2 = 0L;
  33.     pb->utillong3 = 0L;
  34.     pb->utillong4 = 0L;
  35.     pb->utilhandle1 = 0L;
  36.     pb->utilhandle2 = 0L;
  37.     pb->utilhandle3 = 0L;
  38.     pb->utilhandle4 = 0L;
  39. #endif
  40. }
  41.         
  42.         
  43. #endif